package ym.ecrm.core.domain.marketManagement;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import ym.ecrm.core.domain.base.BaseEntity;
import ym.ecrm.core.domain.customerManagement.Contacter;
import ym.ecrm.core.domain.systemManagement.User;
/**
 * 销售线索
 * @author fage
 *@version 1.0
 */
@Entity
@Table(name = "t_saleLead")
public class SalesLead extends BaseEntity{

	/**
	 * leadCode 线索编号
	 */
	private String leadCode;
	/**
	 * theme 主题
	 */
	private String theme;
	/**
	 * content 内容
	 */
	private String content;
	/**
	 * contacter 联系人
	 */
	@ManyToOne(targetEntity = Contacter.class
			,cascade={CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn(name = "contacterId")
	private Contacter contacter;
	/**
	 * department 单位
	 */
	private String department;
	
	/**
	 * discoverTime 发现时间
	 */
	private String discoverTime;
	/**
	 * source 来源
	 */
	private String source;
	
	/**
	 * user 所有人
	 */
	@ManyToOne(targetEntity = User.class
			,cascade={CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn(name = "userId")
	private User user;
	
}
